package com.larsgard.gedviewer.client.service.callback;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.larsgard.gedviewer.client.event.EventBus;
import com.larsgard.gedviewer.client.event.SearchResultEvent;
import com.larsgard.gedviewer.client.ui.MainUi;
import com.larsgard.gedviewer.shared.ajax.SearchResult;

public class AsyncSearchCallback implements AsyncCallback<SearchResult> {

    @Override
    public void onFailure(Throwable caught) {

    }

    @Override
    public void onSuccess(SearchResult result) {
	MainUi.setWaiting(false);
	SearchResultEvent event = new SearchResultEvent(result);
	EventBus.getInstance().fireEvent(event);
    }

}
